﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate;

namespace BasicFrameworkDemo.Model
{
    using FluentNHibernate.Mapping;
    using FluentNHibernate.Automapping;

    public class UsersEntityMapping : ClassMap<UsersEntity> 
    {
        public UsersEntityMapping()
        {
            Table("Users");
            Id(x => x.Id).GeneratedBy.GuidComb();
            Map(x => x.Name);
            Map(x => x.Age);
            Map(x => x.Sex);
            HasMany(x => x.Contacts);
            Map(x => x.CreationDate);
        }
    }
}
